package com.ggs.anno;

import com.ggs.validation.StateValidation;
import jakarta.validation.Constraint;
import jakarta.validation.Payload;

import java.lang.annotation.*;

@Documented
@Constraint(
        validatedBy = {StateValidation.class}
)
@Target( ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
public @interface State {
    String message() default "state参数的值只能：已发布｜｜草稿！";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}
